package com.tfswue.yhj.listener;

import jakarta.servlet.http.HttpSessionEvent;
import jakarta.servlet.http.HttpSessionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MySessionListener implements HttpSessionListener {
    private static final Logger logger =
            LoggerFactory.getLogger(MySessionListener.class);

    @Override
    public void sessionCreated(HttpSessionEvent se){
        logger.info("会话已创建，Session ID:{}",se.getSession().getId());
    }

    @Override
    public void sessionDestroyed(HttpSessionEvent se){
        logger.info("会话已销毁，Session ID:{}",se.getSession().getId());
    }

}
